var S = function (salary) {
    return salary*4
}
var A = function (salary) {
    return salary*3;
}
var B = function (salary) {
    return salary*2
}

var calculateBonus = function (fun,salary) {
    return fun(salary)
}
console.log(calculateBonus(A,1000));